import dayjs from 'dayjs'
import { CONTAIN_SUB } from '@/enum/modules/public'
import type { RemoteMonitoringParams } from '@/types/modules/api-remoteMonitoring​'
import { PAGING } from '@/constant'

export const defaultPagingParams: Omit<RemoteMonitoringParams, 'energyCode'> & {
  energyCode?: string
}
  = (() => {
    const startTime = dayjs().format('YYYY-MM-DD 00')
    const endTime = dayjs().format('YYYY-MM-DD 23')
    return {
      ...PAGING.PARAMS,
      startTime,
      endTime,
      cycle: '1',
      containSub: CONTAIN_SUB.NO_SUB,
      energyCode: undefined,
      pointId: 0,
    }
  })()

export const rules = generateCurrencyFormRules(
  defaultPagingParams,
)
